package com.client.dao;

import com.client.pojo.EntryLikes;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 词条点赞记录表 Mapper 接口
 * </p>
 *
 * @author ckick
 * @since 2025-09-20 08:28:54
 */
public interface EntryLikesDao extends BaseMapper<EntryLikes> {
    List<EntryLikes> getByIds(Integer userId);

    boolean searchIfLiked(@Param("userId") Integer userId, @Param("entryId") Integer entryId);

    void addLikes(@Param("userId") Integer userId, @Param("entryId") Integer entryId, @Param("authorId") Integer authorId);

    void cancelLikes(@Param("userId") Integer userId, @Param("entryId") Integer entryId);

}
